#ifndef VIDEO_H
#define VIDEO_H

#include "asmf.h"
#include "common.h"

	//The different colours that can be set. Only the first 7 are relevent for background
enum Colours {BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, WHITE, DARKGRAY,
	BRIGHTBLUE, BRIGHTGREEN, BRIGHTCYAN, PINK, BRIGHTMAGENTA, YELLOW, BRIGHTWHITE};

class Video	//Video class 
{
public:
	Video();
	~Video();
	void clear();
	void write(const char *cp);
	void put(char c);
	void gotoxy(unsigned x, unsigned y);
	void SetColour(Colours Text, Colours Back, bool blink);
	unsigned char GetBackColour();
	unsigned char GetTextColour();
	void SetBackColour(Colours col);
	void SetTextColour(Colours col);
	void scrollup();
	void scrollDown();
	
private:
	void setcursor(unsigned x, unsigned y);
	
	short *videomem;		//pointer to video memory
	short crtc_mem;
	int ypos;				//offset, used like a y cord
	int xpos;				//position, used like x cord
	int scrHeight;
	int scrWidth;
	char colour;			//Text colours
	char text;
	char back;
};


#endif
